package com.javalong.affairs.listener;

import android.widget.Toast;

import com.android.volley.NetworkError;
import com.android.volley.NoConnectionError;
import com.android.volley.Response.ErrorListener;
import com.android.volley.ServerError;
import com.android.volley.TimeoutError;
import com.android.volley.VolleyError;
import com.javalong.affairs.common.GlobalApplication;

public class DefaultErrorListener implements ErrorListener {

	public DefaultErrorListener() {
		super();
	}


	@Override
	public void onErrorResponse(VolleyError error) {
		String alert = "";
		if (error instanceof TimeoutError) {
		} else if (error instanceof NoConnectionError) {
		} else if (error instanceof NetworkError) {
		} else if (error instanceof ServerError) {
		} else {
		}
		Toast.makeText(GlobalApplication.getInstance(), alert,
				Toast.LENGTH_SHORT).show();
	}
}
